<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>08.v-for根据数据生成列表结构</title>
		<style type="text/css">
		
		</style>
	</head>

	<body>
		<div id="app">
		<ul>
			<!-- v-for根据数据生成列表结构 -->
			<!-- 语法 (item,index) in 数据 -->
			<li v-for="(item,index) in arr">{{index}}:{{item}}</li>
			<li v-for="(item,index) in objarr">{{item.name}}</li>
		</ul>
		</div>
		<script src="./vue-v2.7.13.js"></script>

		<script>
			
			var app = new Vue({
				el: "#app", //Id #id class .name  标签 div
				//输出的数据
				data: {
					arr:["5","4","6"],
					objarr:[
						{name:'zx'},
						{name:'ww'},
					]
				},
				//对象 方法
				methods: {
					
				}
			})
		</script>

	</body>

</html>
